<%@ page contentType="text/html; charset=UTF-8" %>
<%@ include file="../../common.jsp" %>
<html>
<head>
<title>产品管理</title>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<LINK href="<%=root%>/css/caigouxitong.css" type=text/css rel=stylesheet>
<SCRIPT language="JavaScript" src="<%=root%>/js/calendar.js"></SCRIPT>
<SCRIPT language="JavaScript" src="<%=root%>/js/common.js"></SCRIPT>
<SCRIPT language="JavaScript" src="<%=root%>/js/string.js"></SCRIPT>
<%
ArrayList mal=(ArrayList)request.getAttribute("mal");
%>
</head>
<body BGCOLOR="#f2f2f2" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td height="20"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
        <tr height="20">
          <td height="20" width="1" class="mtxt_black">&nbsp;</td>
          <td height="30" width="758" class="mtxt_black">相同集中编码产品信息</td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td class="bg_line" height="2"></td>
  </tr>
</table>
<br>
<%
    if(mal != null){
%>
    <center>
    <table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr>
            <td>
            <form name='pager' method="post">
                <table class=bg_table id=tableId    cellspacing=1 cellpadding=2 width=100% align=center border=0>
                    <tbody> 
                    <tr class="bg_column" height=20> 
                        <td class=top align="center"> 
                        </td>
                        <td class=top align="center"> 
                        <div align="center" class="txt_content">集中编码</div>
                        </td>
                        <td class=top align="center"> 
                        <div align="center" class="txt_content">产品编号</div>
                        </td>
                        <td class=top align="center"> 
                        <div align="center" class="txt_content">产品名称</div>
                        </td>
                        <td class=top align="center"> 
                        <div align="center" class="txt_content">产品类别</div>
                        </td>
                        <td class=top align="center"> 
                        <div align="center" class="txt_content">供应商</div>
                        </td>
                        <td class=top align="center"> 
                        <div align="center" class="txt_content">价格(元)</div>
                        </td>
                        
                        <td class=top align="center"> 
                        <div align="center" class="txt_content">单位</div>
                        </td>
            
                        <td class=top align="center"> 
                        <div align="center" class="txt_content">质保期</div>
                        </td>
                        
                        <td class=top align="center"> 
                        <div align="center" class="txt_content">规格</div>
                        </td>   
                                                                            
                        <td class=top align="center"> 
                        <div align="center" class="txt_content">型号</div>
                        </td>                                                                                                                                               
                       
                        <td class=top align="center"> 
                        <div align="center" class="txt_content">品牌</div>
                        </td>
            
                        <td class=top align="center"> 
                        <div align="center" class="txt_content">生产厂商</div>
                        </td>
                        
                        <td class=top align="center"> 
                        <div align="center" class="txt_content">结算模式</div>
                        </td>
                        
                        <td class=top align="center"> 
                        <div align="center" class="txt_content">是否采购</div>
                        </td>
                        
                        <td class=top align="center"> 
                        <div align="center" class="txt_content">产品类型</div>
                        </td>
                        
                        <td class=top align="center"> 
                        <div align="center" class="txt_content">是否有效</div>
                        </td>
                                                                
                        <td class=top align="center"> 
                        <div align="center" class="txt_content">详细信息</div>
                        </td>                                        
                    </tr>
                    <%
                        for(int i=0; i<mal.size(); i++){
                            GSManufactureBean mb=(GSManufactureBean)mal.get(i);
                            String tTempStr="";
                            if(i%2==0){
                                tTempStr="class=\"bg_row_odd\"";
                            }else {
                                tTempStr="class=\"bg_row_even\"";
                            }
                    %>
                            <tr <%=tTempStr%> height=20>
                                <td class=top align="center"> 
                                    <input type="radio" name="selmanufacture" value="<%=i %>">
                                    <input type="hidden"  name="manufacturepeicecode" value="<%=mb.getGs_drawing_peice_code()%>">
                                    <input type="hidden"  name="manufactureproperty" value="<%=mb.getGs_appender_property()%>">
                                    <input type="hidden"  name="manufactureremark" value="<%=mb.getGs_remark()%>">
                                    <input type="hidden"  name="manufacturearea" value="<%=mb.getGs_make_area()%>">
                                </td>

                                <td class=top align="center"> 
                                    <div align="center" class="txt_content">
                                    <%=mb.getGs_concentricity()%>
                                    </div>
                                </td>   
                                <td class=top align="center"> 
                                    <div align="center" class="txt_content">
                                    <%=mb.getGs_manufacture_id()%>
                                    </div>
                                </td>                               
                                <td class=top align="center"> 
                                    <div align="center" class="txt_content">
                                    <a href="<%= response.encodeURL(request.getContextPath() + "/A400308.do") %>?manufactureId=<%=mb.getGs_manufacture_id()%>&concentricityId=<%=mb.getGs_concentricity()%>" target="_blank"><%=mb.getGs_manufacture_name()%></a>
                                    <input type="hidden"  name="manufacturename" value="<%=mb.getGs_manufacture_name()%>">
                                    </div>
                                </td>   
                                <td class=top align="center"> 
                                    <div align="center" class="txt_content">
                                    <%=mb.getGs_manufacture_category_name()%>
                                    <input type="hidden"  name="manufacturecatname" value="<%=mb.getGs_manufacture_category_desc()%>">
                                    </div>
                                </td> 
                                <td class=top align="center"> 
                                    <div align="center" class="txt_content">
                                    <a href="<%= response.encodeURL(request.getContextPath() + "/A400108.do") %>?providerId=<%=mb.getGs_provider_id()%>" target="contentForm">
                                    <%=mb.getGs_provider_name()%>
                                    </a>
                                    <input type="hidden"  name="manufactureproname" value="<%=mb.getGs_provider_name()%>">
                                    <input type="hidden"  name="manufactureproid" value="<%=mb.getGs_provider_id()%>">
                                    </div>
                                </td>                           
                                <td class=top align="center"> 
                                    <div align="center" class="txt_content">
                                    <%=mb.getGs_manufacture_unitprice()%>
                                    <input type="hidden"  name="manufactureprice" value="<%=mb.getGs_manufacture_unitprice()%>">
                                    </div>
                                </td>
                                <td class=top align="center"> 
                                    <div align="center" class="txt_content">
                                    <%=mb.getGs_quant_unit()%>
                                    <input type="hidden"  name="manufactureunit" value="<%=mb.getGs_quant_unit()%>">
                                    </div>
                                </td>
                                <td class=top align="center"> 
                                    <div align="center" class="txt_content">
                                    <%=mb.getGs_quality_assure_period()%>
                                    <input type="hidden"  name="manufactureassureper" value="<%=mb.getGs_quality_assure_period()%>">
                                    </div>
                                </td>   
                                <td class=top align="center"> 
                                    <div align="center" class="txt_content">
                                    <%=mb.getGs_manufacture_spec()%>
                                    <input type="hidden"  name="manufacturespec" value="<%=mb.getGs_manufacture_spec()%>">
                                    </div>
                                </td>                               
                                <td class=top align="center"> 
                                    <div align="center" class="txt_content">
                                    <%=mb.getGs_manufacture_type()%>
                                    <input type="hidden"  name="manufacturetype" value="<%=mb.getGs_manufacture_type()%>">
                                    </div>
                                </td>   
                
                                                                                            
                                <td class=top align="center"> 
                                    <div align="center" class="txt_content">
                                    <%=mb.getGs_manufacture_brand()%>
                                    <input type="hidden"  name="manufacturebrand" value="<%=mb.getGs_manufacture_brand()%>">
                                    </div>
                                </td>   
                
                
                                <td class=top align="center"> 
                                    <div align="center" class="txt_content">
                                    <%=mb.getGs_manufacturer_name()%>
                                    <input type="hidden"  name="manufacturecreat" value="<%=mb.getGs_manufacturer_name()%>">
                                    </div>
                                </td>
                
                                <td class=top align="center"> 
                                    <div align="center" class="txt_content">
                                    <%=DefineDic.getBalanceMode(mb.getGs_balance_mode())%>
                                    <input type="hidden"  name="manufacturebalance" value="<%=mb.getGs_balance_mode()%>">
                                    </div>
                                </td>   
                                
                                <td class=top align="center"> 
                                    <div align="center" class="txt_content">
                                    <%if(mb.getIs_buy().equals("1")){ %>
                                    是
                                    <%}else if(mb.getIs_buy().equals("0"))
                                    {%>
                                    否
                                    <%}else
                                    {%>
                                    无
                                    <%}%>
                                    <input type="hidden"  name="manufacturebuy" value="<%=mb.getIs_buy()%>">
                                    </div>
                                </td>   
                                <td class=top align="center"> 
                                    <div align="center" class="txt_content">
                                    <%=GSBaseManager.getProductTypeByCode(mb.getIs_normal())%>
                                    </div>
                                </td>
                                
                                <td class=top align="center"> 
                                    <div align="center" class="txt_content">
                                    <%if(mb.getGs_validity().equals("1")){ %>
                                    有效
                                    <%}else if(mb.getGs_validity().equals("0"))
                                    {%>
                                    <font color="red">无效</font>
                                    <%}else
                                    {%>
                                    无
                                    <%}%>
                                    </div>
                                </td>   
                                <td class=top align="center"> 
                                    <div align="center" class="txt_content">
                                    <a href="<%= response.encodeURL(request.getContextPath() + "/A400308.do") %>?manufactureId=<%=mb.getGs_manufacture_id()%>&concentricityId=<%=mb.getGs_concentricity()%>" target="_blank">详细</a>
                                    </div>
                                </td>                                                                   
                            </tr>
                            <%} %>
                </table>
                </form>                   
            </td>
        </tr>
        <tr>
            <td align=center class="bg_row_odd">
                <input type="button" class="kuang" width="58" height="24" value="复制信息" onclick="radioselect();"/>
                <input type="button" class="kuang" width="58" height="24" value="关 闭" onclick="javascript:window.close();"/>            </td>
        </tr>
    </table>
    
    </center>
<%      
    }
%>
</body>
<script type="text/javascript">
    function radioselect(){
        var sel=0;
        var row=0;
        var sm=document.getElementsByName("selmanufacture");
        if(sm != null){
            for(i=0; i<sm.length;i++){
                if(sm[i].checked){
                    sel++;
                    row=i;
                }
            }
        }
        if(sel==0){
            alert("请选择要复制的产品");
            return false;
        }else{
            var ary=new Array(17);
            ary[0]=document.getElementsByName("manufacturecatname")[row].value;
            ary[1]=document.getElementsByName("manufacturename")[row].value;
            ary[2]=document.getElementsByName("manufactureproname")[row].value;
            ary[3]=document.getElementsByName("manufactureproid")[row].value;
            ary[4]=document.getElementsByName("manufactureprice")[row].value;
            ary[5]=document.getElementsByName("manufactureunit")[row].value;
            ary[6]=document.getElementsByName("manufacturetype")[row].value;
            ary[7]=document.getElementsByName("manufacturespec")[row].value;
            ary[8]=document.getElementsByName("manufactureassureper")[row].value;
            ary[9]=document.getElementsByName("manufacturecreat")[row].value;
            ary[10]=document.getElementsByName("manufacturearea")[row].value;
            ary[11]=document.getElementsByName("manufacturebrand")[row].value;
            ary[12]=document.getElementsByName("manufacturepeicecode")[row].value;
            ary[13]=document.getElementsByName("manufacturebuy")[row].value;
            ary[14]=document.getElementsByName("manufacturebalance")[row].value;
            ary[15]=document.getElementsByName("manufactureproperty")[row].value;
            ary[16]=document.getElementsByName("manufactureremark")[row].value;
            window.returnValue = ary;
            window.close();
        }
    }
</script>
</html>